package com.java.base.exercise.disruptor;

import com.lmax.disruptor.EventHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author RenPu
 * @Date 2023/10/25 14:44
 * @Version 1.0
 * @Description: disrupstor消息消费者
 **/

@Slf4j
public class LongEventHandler implements EventHandler<LongEvent> {

    @Override
    public void onEvent(LongEvent longEvent, long sequence, boolean endofBatch) throws Exception {
        log.info("consumer::"+Thread.currentThread().getName()+"：：：："
                +"Event : Value="+longEvent.getValue()+"sequence:::="+sequence);
    }
}
